;(function($){
    $(function(){
        //验证码的更新验证
        // function changeRandom(imgId){
        //     $("#"+imgId).attr("src",'http://ns.iyaokao.com/show/login/random.action?d='+Math.random());
        // }


        //提交信息收集资料的提交
        $(".chax").click(function(){
            var regex1 = /^[\u4e00-\u9fa5]/;
            var regex2 = /^1[34578]\d{9}$/;
            var regex3 = /^[\u4e00-\u9fa5]*$/;
            var regex4 = /^[0-9]*$/;
            var UserName = document.getElementById('UserName');
            var UserPhone = document.getElementById('UserPhone');
            var UserSpecialty = document.getElementById('UserSpecialty');
            var UserNian = document.getElementById('UserNian');

            if(UserName.value == ""){
                alert("请输入姓名");
            }else{
                if(!regex1.test(UserName.value)){
                    alert("请输入正确的姓名");
                }else{
                    if(UserPhone.value == ""){
                        alert("请输入手机号码");
                    }else{
                        if(!regex2.test(UserPhone.value)){
                            alert("请输入正确的手机号");
                        }else{
                            if(UserSpecialty.value == ""){
                                alert("请输入您的专业");
                            }else{
                                if(!regex3.test(UserSpecialty.value)){
                                    alert("请输入正确的专业");
                                }else{
                                    if(UserNian.value == ""){
                                        alert("请输入您的工作年限");
                                    }else{
                                        if(!regex4.test(UserNian.value)){
                                            alert("请输入正确的工作年限");
                                        }
                                        alert("提交成功");
                                        tijiao();
                                    }
                                }
                               
                            }
                            
                        }
                    }
                }
            }

        })


        function submit(callback){
            document.getElementById("feedBackForm2").submit();
            callback();
        }

        function reset(){
            document.getElementById("feedBackForm2").reset();
        }
        function tijiao(){
            submit(reset);
        }










    })
})(jQuery)